package com.hwadee.property.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.IsAutoIncrement;
import com.gitee.sunchenbin.mybatis.actable.annotation.IsKey;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.command.BaseModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.LinkedHashMap;

@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "building")//楼栋信息表
public class Building extends BaseModel {
    @TableId(type = IdType.AUTO)//mybatis-plus主键注解
    @IsAutoIncrement   //自增
    @IsKey             //actable主键注解
    @Column(comment = "楼栋ID")//对应数据库字段，不配置name会直接采用属性名作为字段名comment是注解
    private Long id;

    @TableField(exist = false)
    private LinkedHashMap<String, String> orderBy;

    @TableField(exist = false)
    private int currentPage;

    @TableField(exist = false)
    private int pageSize;

    @TableField(exist = false)
    private int start;


    @Column(comment = "所属小区 ID")
    @TableField("community_id")
    private Long communityId;
    @Column(comment = "楼栋编号")
    @TableField("building_number")
    private Long buildingNumber;
    @Column(comment = "楼栋单元号")
    @TableField("building_unit")
    private Integer buildingUnit;
    @Column(comment = "楼栋楼层数")
    @TableField("floor_count")
    private Integer floorCount;
    @Column(comment = "楼栋位置")
    private String location;
    @Column(comment = "楼栋户型")
    @TableField("house_type")
    private String houseType;
    @Column(comment = "楼栋户数")
    private Integer households;
}
